public enum Work {
    X(){
        @Override
        public void swim() {
            System.out.println("youyong");
        }
    },Y("ew"){
        @Override
        public void swim() {
            System.out.println(getA() + "jeiw");
        }
    },Z(){
        @Override
        public void swim() {
            System.out.println("wojfi");
        }
    };


    Work() {
    }

    Work(String a) {
        this.a = a;
    }

    public abstract void swim();
    private String a;
    public void test() {
        System.out.println("hehehe");
    }

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }
}
